﻿using Ken_WPF_UI.View.page;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Ken_WPF_UI.View
{
    /// <summary>
    /// FrameWindow.xaml 的交互逻辑
    /// </summary>
    public partial class FrameWindow : Window
    {
        public FrameWindow()
        {
            InitializeComponent();
        }

        //代码层面  加载frame的source
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            //1.使用相对路径 (注意文件后缀名要写)
            //this.framePage.Source = new Uri(@"page\InnerPage1.xaml", UriKind.Relative);

            ////2.创建Page对象  （非Window对象）
            //InnerPage1 innerPage1 = new InnerPage1();
            //this.framePage.Navigate(innerPage1);

            ////3.创建Page对象并传递参数  （非Window对象）
            InnerPage1 innerPage2 = new InnerPage1();
            this.framePage.Navigate(innerPage2, "我是个参数");
        }
    }
}
